﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace UniversalEditor.Base.Utils.Converters
{
	public class BoolToBrushConverter : IValueConverter
	{
		public Brush PositiveBrush { get; set; }
		public Brush NegativeBrush { get; set; }

		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			bool target = (bool)value;

			return target ? PositiveBrush : NegativeBrush;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return null;
		}
	}
}
